<?php
Class Day21_detail{
    public function get($id){
        $mydata=$this->mydata($id);
//        exit(dump($mydata));
        require_once '../views/day21/v_day21_detail.php';
    }


    private  function mydata($id){
        $sql="SELECT name,content1,content1,content2,content3 From day21_habit WHERE id=:id ";
        $query=MYSQL::getInstance()->prepare($sql);
        $query->bindValue("id",$id,PDO::PARAM_INT);
        $query->execute();
        return $query->fetchAll(PDO::FETCH_ASSOC);
    }
}